package com.aaa.product.service.impl;

import com.aaa.product.entity.TbOrdInf;
import com.aaa.product.service.ISeckKillService;
import lombok.AllArgsConstructor;
import lombok.SneakyThrows;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.stereotype.Service;



@Service
@AllArgsConstructor
public class SeckKillServiceImpl implements ISeckKillService {
    //交换机名称
    public static final String ITEM_TOPIC_EXCHANGE = "xwl_exchange";
    //下单队列路由key
    public static final String ITEM_ROUKEY = "item.sendKill";
    //引入消息发送API
    private RabbitTemplate rabbitTemplate;

    @Override
    @SneakyThrows
    public void getShopByType(String json) {
        //不做任何操作处理~直接进去队列-
        rabbitTemplate.convertAndSend(ITEM_TOPIC_EXCHANGE,ITEM_ROUKEY,json);
    }
}